#pragma once

#include "SDLSprite.h"
#include "SDLInput.h"

class SDLEngine
{
public:
	static const int SCREEN_BPP = 32;

	static SDLEngine* GetInstance()
	{
		if(instance == NULL)
		{
			instance = new SDLEngine();
		}
		return instance;
	}

	static void Kill()
	{
		if(instance != NULL)
		{
			delete instance;
			instance = NULL;
		}
	}

	bool IsInitialized(){ return isInitialized; }
	SDL_Surface* GetScreen(){ return screen; }

	int Initialize(const std::string screenCaption, const int screenWidth, const int screenHeight);

	void Run();

	void Update();
	void Draw();

private:
	SDLEngine();
	~SDLEngine();

	static SDLEngine* instance;

	SDL_Surface* screen;
	bool isInitialized;
};

